<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件冒泡</title>
    <script src="js/vue.js"></script>
    <style>
        .parentCls{
            width: 200px;
            height: 160px;
            background-color: pink;
        }
        .childCls{
            margin: 20px;
            width: 100px;
            height: 80px;
            background-color: skyblue;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="parentCls" @click.self="clickParent">
            <div class="childCls" @click="clickChild"></div>
        </div>
    </div>
</body>
</html>
<script>
    var vm=new Vue({
        el:'#app',
        methods: {
            clickParent(){
                console.log('***clickParent***');
            },
            clickChild(){
                console.log('###clickChild###');
            }
        },
    });
</script>